<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <!-- meta -->
  <meta charset="utf-8"/>
  <meta name='description' content='CNode：Node.js专业中文社区'>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <meta name="keywords" content="nodejs, node, express, connect, socket.io"/>
  <!-- see http://smerity.com/articles/2013/where_did_all_the_http_referrers_go.html -->
  <meta name="referrer" content="always">

  
  <meta name="author" content="EDP@TaoBao" />
  
  <meta property="wb:webmaster" content="617be6bd946c6b96" />
  

  <link title="RSS" type="application/rss+xml" rel="alternate" href="/rss"/>

  
  <link rel="icon" href="//o4j806krb.qnssl.com/public/images/cnode_icon_32.png" type="image/x-icon"/>
  

  <!-- style -->
  <link rel="stylesheet" href="//o4j806krb.qnssl.com/public/stylesheets/index.min.0b4a1ed9.min.css" media="all" />


  <!-- scripts -->
  <script src="//o4j806krb.qnssl.com/public/index.min.e2845a23.min.js"></script>


  
  <title>快速搭建 Node.js 开发环境以及加速 npm - CNode技术社区</title>
  
  <meta content="_csrf" name="csrf-param">
  <meta content="lBJgAyYH-BVqs-DNMSrzAnzQE4416ENZzVH4" name="csrf-token">
</head>
<body>
<!-- navbar -->
<div class='navbar'>
  <div class='navbar-inner'>
    <div class='container'>
      <a class='brand' href='/'>
        
          <img src="//o4j806krb.qnssl.com/public/images/cnodejs_light.svg" />
        
      </a>

      <form id='search_form' class='navbar-search' action="/search">
        <input type='text' id='q' name='q' class='search-query span3' value=''/>
      </form>
      <ul class='nav pull-right'>
        <li><a href='/'>首页</a></li>
        
        <li><a href='/getstart'>新手入门</a></li>
        <li><a href='/api'>API</a></li>
        
        <li><a href="/about" target="">关于</a></li>
        
        
        <li><a href='/signup'>注册</a></li>
        <li><a href='/signin'>登录</a></li>
        
      </ul>
      <a class="btn btn-navbar" id="responsive-sidebar-trigger">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </a>
    </div>
  </div>
</div>
<div id='main'>
  <div id='sidebar'>
  <div class='panel'>
    <div class='header'>
      <span class='col_fade'>作者</span>
    </div>
    <div class='inner'>
      <div class='user_card'>
  <div>
    <a class='user_avatar' href="/user/fengmk2">
      <img src="https://avatars.githubusercontent.com/u/156269?v=3&amp;s=120" title="fengmk2"/>
    </a>
    <span class='user_name'><a class='dark' href="/user/fengmk2">fengmk2</a></span>

    <div class='board clearfix'>
      <div class='floor'>
        <span class='big'>积分: 3945 </span>
      </div>
    </div>
    <div class="space clearfix"></div>
    <span class="signature">
        “
        
            一切都是最好的安排
        
        ”
    </span>
  </div>
</div>



    </div>
  </div>

  
    
<div class='panel'>
  <div class='inner ads'>

    
      
      <a href="https://www.wilddog.com/?utm_source=cnodejs.org&utm_medium=banner&utm_campaign=orangemarch" target="_blank" class="banner sponsor_outlink"
    data-label="wilddog">
        <img src="//cdn.wilddog.com/images/ads/cnode/cnode-540x130-1.jpg">
      </a>
    
      
        <div class="sep10"></div>
      
      <a href="http://submail.cn/sms?s=cnode" target="_blank" class="banner sponsor_outlink"
    data-label="submail">
        <img src="//dn-cnode.qbox.me/FixbBzsaHXlymE1_QRontEhsWR3O">
      </a>
    
      
        <div class="sep10"></div>
      
      <a href="http://alinode.aliyun.com/" target="_blank" class="banner sponsor_outlink"
    data-label="alinode">
        <img src="//dn-cnode.qbox.me/Fn4D6BhOTz1IswvmzeZ1q7QW1ls_">
      </a>
    
      
        <div class="sep10"></div>
      
      <a href="https://www.jpush.cn/?from=cnode01" target="_blank" class="banner sponsor_outlink"
    data-label="jpush">
        <img src="//dn-cnode.qbox.me/FuYV5_y5_a2zUS7evoOiDsihbk9z">
      </a>
    
      
        <div class="sep10"></div>
      
      <a href="https://cnodejs.org/topic/55a77e2f93ce02cd25985916" target="_blank" class="banner sponsor_outlink"
    data-label="guangyin">
        <img src="//dn-cnode.qbox.me/FphIGf6l1QKaEzhnlLHvw49GIv_P">
      </a>
    
      
        <div class="sep10"></div>
      
      <a href="http://www.ucloud.cn/site/seo.html?utm_source=zanzhu&utm_campaign=cnodejs&utm_medium=display&utm_content=shengji&ytag=cnodejs_display" target="_blank" class="banner sponsor_outlink"
    data-label="ucloud-banner">
        <img src="//dn-cnode.qbox.me/Fk7rRGVgB0XWgKjlpJs72VJty9Eu">
      </a>
    
  </div>
</div>

  

  <div class='panel'>
    <div class='header'>
      <span class='col_fade'>作者其它话题</span>
    </div>
    <div class='inner'>
      
      <ul class='unstyled'>
        <li>
  <div><a class='dark topic_title' href="/topic/5711f1816a2d2bda52de962a" title="cnode 社区也切换到 Let&#39;s encrypt 了">cnode 社区也切换到 Let&#39;s encrypt 了</a>
  </div>
</li>
<li>
  <div><a class='dark topic_title' href="/topic/5440a2486ab98d6c509e0138" title="SQL to Sequelize Mapping Chart">SQL to Sequelize Mapping Chart</a>
  </div>
</li>
<li>
  <div><a class='dark topic_title' href="/topic/56dcd2cc502596633dc2c3e9" title="cnpm@beta 测试：征集 npm install 非常慢的应用">cnpm@beta 测试：征集 npm install 非常慢的应用</a>
  </div>
</li>
<li>
  <div><a class='dark topic_title' href="/topic/4f16442ccae1f4aa270010d5" title="nodejs web开发入门: Simple-TODO Nodejs 实现版">nodejs web开发入门: Simple-TODO Nodejs 实现版</a>
  </div>
</li>
<li>
  <div><a class='dark topic_title' href="/topic/54d1084fef1b48510c27e2f8" title="5分钟搭建一个私有 npm registry">5分钟搭建一个私有 npm registry</a>
  </div>
</li>

      </ul>
      
    </div>
  </div>

  <div class='panel'>
    <div class='header'>
      <span class='col_fade'>无人回复的话题</span>
    </div>
    <div class='inner'>
      
      <ul class='unstyled'>
        <li>
  <div><a class='dark topic_title' href="/topic/5737f68e32bf2c90579f5394" title="请教一个关于Socket.io的问题">请教一个关于Socket.io的问题</a>
  </div>
</li>
<li>
  <div><a class='dark topic_title' href="/topic/57371efc32bf2c90579f5381" title="Neovim配置分享,常见问题解答.">Neovim配置分享,常见问题解答.</a>
  </div>
</li>
<li>
  <div><a class='dark topic_title' href="/topic/5736e2c940b29698539812f9" title="leancloud-js 与 parse-js 有点像啊">leancloud-js 与 parse-js 有点像啊</a>
  </div>
</li>
<li>
  <div><a class='dark topic_title' href="/topic/57368a2e8f82e08e531de71a" title="chai断言库在浏览器端怎么加载啊">chai断言库在浏览器端怎么加载啊</a>
  </div>
</li>
<li>
  <div><a class='dark topic_title' href="/topic/57359bd1c3e4ef7657ab12fc" title="Github上排名前100的前端项目有哪些">Github上排名前100的前端项目有哪些</a>
  </div>
</li>

      </ul>
      
    </div>
  </div>
</div>

<div id='content'>
  <div class='panel'>
    <div class='header topic_header'>
      <span class="topic_full_title">

        
<span class='put_good'>精华</span>



        快速搭建 Node.js 开发环境以及加速 npm
      </span>
      <div class="changes">
        <span>
          发布于 2 年前
        </span>
        <span>
          作者 <a href="/user/fengmk2">fengmk2</a>
        </span>
        <span>
          56766 次浏览
        </span>
        
          <span>
            最后一次编辑是 2 个月前
          </span>
        
        
          <span> 来自 分享</span>
        

        

      </div>
      
    </div>
    <div class='inner topic'>

      <div class='topic_content'>
        <div class="markdown-text"><h1>快速搭建 Node.js 开发环境以及加速 npm</h1>
<p>在公交车上刷微博，还是有很多同学在咨询:</p>
<ul>
<li>如何快速搭建 <a href="https://nodejs.org">node</a> 开发环境</li>
<li><a href="https://www.npmjs.org">npm</a> 超慢</li>
<li><a href="https://github.com">github</a> 无法打开的问题</li>
</ul>
<p>于是我觉得应该写一篇文章解答所有这些起步问题，让新同学也能顺顺利利入门。</p>
<h2>快速搭建 <a href="https://nodejs.org">Node.js</a> 开发环境</h2>
<p>如果你想长期做 <a href="https://nodejs.org">node</a> 开发, 或者想快速更新 <a href="https://nodejs.org">node</a> 版本, 或者想快速切换 <a href="https://nodejs.org">node</a> 版本,
那么在<strong>非 Windows(如 osx, linux)</strong> 环境下, 请使用 <a href="https://github.com/creationix/nvm">nvm</a> 来安装你的 <a href="https://nodejs.org">node</a> 开发环境, 保持系统的干净.</p>
<p>如果你使用 <strong>Windows</strong> 做开发, 那么你可以使用 <a href="https://github.com/hakobera/nvmw">nvmw</a> 来替代 <a href="https://github.com/creationix/nvm">nvm</a></p>
<h2>osx, linux 环境</h2>
<p>如果你是 windows 环境开发, 请跳过这里, 直接查看下一章.</p>
<h3>git clone <a href="https://github.com/creationix/nvm">nvm</a></h3>
<p>直接从 github clone nvm 到本地, 这里假设大家都使用 <code>~/git</code> 目录存放 git 项目:</p>
<pre class="prettyprint language-bash"><code>$ cd ~&#x2F;git
$ git clone https:&#x2F;&#x2F;github.com&#x2F;creationix&#x2F;nvm.git
</code></pre><p>配置终端启动时自动执行 <code>source ~/git/nvm/nvm.sh</code>,
在 <code>~/.bashrc</code>, <code>~/.bash_profile</code>, <code>~/.profile</code>, 或者 <code>~/.zshrc</code> 文件添加以下命令:</p>
<pre class="prettyprint language-bash"><code>source ~&#x2F;git&#x2F;nvm&#x2F;nvm.sh
</code></pre><p>重新打开你的终端, 输入 <code>nvm</code></p>
<pre class="prettyprint language-bash"><code>$ nvm

Node Version Manager

Usage:
    nvm help                    Show this message
    nvm --version               Print out the latest released version of nvm
    nvm install [-s] &lt;version&gt;  Download and install a &lt;version&gt;, [-s] from source
    nvm uninstall &lt;version&gt;     Uninstall a version
    nvm use &lt;version&gt;           Modify PATH to use &lt;version&gt;
    nvm run &lt;version&gt; [&lt;args&gt;]  Run &lt;version&gt; with &lt;args&gt; as arguments
    nvm current                 Display currently activated version
    nvm ls                      List installed versions
    nvm ls &lt;version&gt;            List versions matching a given description
    nvm ls-remote               List remote versions available for install
    nvm deactivate              Undo effects of NVM on current shell
    nvm alias [&lt;pattern&gt;]       Show all aliases beginning with &lt;pattern&gt;
    nvm alias &lt;name&gt; &lt;version&gt;  Set an alias named &lt;name&gt; pointing to &lt;version&gt;
    nvm unalias &lt;name&gt;          Deletes the alias named &lt;name&gt;
    nvm copy-packages &lt;version&gt; Install global NPM packages contained in &lt;version&gt; to current version

Example:
    nvm install v0.10.24        Install a specific version number
    nvm use 0.10                Use the latest available 0.10.x release
    nvm run 0.10.24 myApp.js    Run myApp.js using node v0.10.24
    nvm alias default 0.10.24   Set default node version on a shell

Note:
    to remove, delete or uninstall nvm - just remove ~&#x2F;.nvm, ~&#x2F;.npm and ~&#x2F;.bower folders
</code></pre><h3>通过 <a href="https://github.com/creationix/nvm">nvm</a> 安装任意版本的 <a href="https://nodejs.org">node</a></h3>
<p>nvm 默认是从 <a href="http://nodejs.org/dist/">http://nodejs.org/dist/</a> 下载的, 国外服务器, 必然很慢,
好在 nvm 以及支持从镜像服务器下载包, 于是我们可以方便地从七牛的 node dist 镜像下载:</p>
<pre class="prettyprint language-bash"><code>$ NVM_NODEJS_ORG_MIRROR=https:&#x2F;&#x2F;npm.taobao.org&#x2F;mirrors&#x2F;node nvm install 4
</code></pre><p>于是你就会看到一段非常快速进度条:</p>
<pre class="prettyprint"><code>######################################################################## 100.0%
Now using node v4.3.2
</code></pre><p>如果你不想每次都输入环境变量 <code>NVM_NODEJS_ORG_MIRROR</code>, 那么我建议你加入到 <code>.bashrc</code> 文件中:</p>
<pre class="prettyprint language-bash"><code># nvm
export NVM_NODEJS_ORG_MIRROR=https:&#x2F;&#x2F;npm.taobao.org&#x2F;mirrors&#x2F;node
source ~&#x2F;git&#x2F;nvm&#x2F;nvm.sh
</code></pre><p>然后你可以继续非常方便地安装各个版本的 node 了, 你可以查看一下你当前已经安装的版本:</p>
<pre class="prettyprint"><code>$ nvm ls
         nvm
     v0.8.26
    v0.10.26
    v0.11.11
-&gt;  v4.3.2
</code></pre><h2>windows 环境</h2>
<h3>git clone <a href="https://github.com/hakobera/nvmw">nvmw</a></h3>
<p>直接从 github clone nvmw 到本地, 这里假设大家都使用 <code>d:\git</code> 目录存放 git 项目:</p>
<pre class="prettyprint language-bash"><code>$ d:
$ cd git
$ git clone https:&#x2F;&#x2F;github.com&#x2F;hakobera&#x2F;nvmw.git
</code></pre><p>设置 <code>d:\git\nvmw</code> 目录到你的 <code>PATH</code> 环境变量中:</p>
<pre class="prettyprint language-bash"><code>set &quot;PATH=d:\git\nvmw;%PATH%&quot;
</code></pre><p>重新打开你的终端, 输入 <code>nvmw</code></p>
<pre class="prettyprint language-bash"><code>$ nvmw

Usage:
  nvmw help                    Show this message
  nvmw install [version]       Download and install a [version]
  nvmw uninstall [version]     Uninstall a [version]
  nvmw use [version]           Modify PATH to use [version]
  nvmw ls                      List installed versions

Example:
  nvmw install v0.6.0          Install a specific version number
  nvmw use v0.6.0              Use the specific version
</code></pre><h3>通过 <a href="https://github.com/hakobera/nvmw">nvmw</a> 安装任意版本的 <a href="https://nodejs.org">node</a></h3>
<p>nvmw 默认是从 <a href="http://nodejs.org/dist/">http://nodejs.org/dist/</a> 下载的, 国外服务器, 必然很慢,
好在 <a href="https://github.com/hakobera/nvmw">nvmw</a> 以及支持从镜像服务器下载包, 于是我们可以方便地从七牛的 node dist 镜像下载:</p>
<pre class="prettyprint language-bash"><code>$ set &quot;NVMW_NODEJS_ORG_MIRROR=https:&#x2F;&#x2F;npm.taobao.org&#x2F;mirrors&#x2F;node&quot;
$ nvmw install 4.3.2
</code></pre><p>于是你就会看到一段非常快速进度条:</p>
<pre class="prettyprint"><code>######################################################################## 100.0%
Now using node v4.3.2
</code></pre><p>如果你不想每次都输入环境变量 <code>NVMW_NODEJS_ORG_MIRROR</code>, 那么我建议你在全局环境变量中增加它.</p>
<p>然后你可以继续非常方便地安装各个版本的 node 了, 你可以查看一下你当前已经安装的版本:</p>
<pre class="prettyprint"><code>$ nvmw ls

v0.10.26
v0.11.12
Current: v4.3.2
</code></pre><p>到此, 无论是 windows 环境, 还是 osx, linux 环境, 都能快速安装多个版本的 node 了.</p>
<h2>使用 <a href="https://cnpmjs.org">cnpm</a> 加速 <a href="https://www.npmjs.org">npm</a></h2>
<p>同理 nvm , npm 默认是从国外的源获取和下载包信息, 不慢才奇怪.
可以通过简单的 <code>---registry</code> 参数, 使用国内的镜像 <a href="https://registry.npm.taobao.org">https://registry.npm.taobao.org</a> :</p>
<pre class="prettyprint language-bash"><code>$ npm --registry=https:&#x2F;&#x2F;registry.npm.taobao.org install koa
</code></pre><p>于是屏幕又哗啦哗啦地一大片输出:</p>
<pre class="prettyprint language-bash"><code>$ npm --registry=https:&#x2F;&#x2F;registry.npm.taobao.org install koa
npm http GET https:&#x2F;&#x2F;registry.npm.taobao.org&#x2F;koa
npm http 200 https:&#x2F;&#x2F;registry.npm.taobao.org&#x2F;koa
...
npm http 200 https:&#x2F;&#x2F;registry.npm.taobao.org&#x2F;negotiator
npm http 200 https:&#x2F;&#x2F;registry.npm.taobao.org&#x2F;keygrip
koa[@0](&#x2F;user&#x2F;0).5.2 node_modules&#x2F;koa
├── koa-compose[@2](&#x2F;user&#x2F;2).2.0
├── statuses[@1](&#x2F;user&#x2F;1).0.2
├── finished[@1](&#x2F;user&#x2F;1).1.1
├── escape-html[@1](&#x2F;user&#x2F;1).0.1
├── only[@0](&#x2F;user&#x2F;0).0.2
├── debug[@0](&#x2F;user&#x2F;0).8.0
├── fresh[@0](&#x2F;user&#x2F;0).2.2
├── type-is[@1](&#x2F;user&#x2F;1).0.1
├── delegates[@0](&#x2F;user&#x2F;0).0.3
├── mime[@1](&#x2F;user&#x2F;1).2.11
├── co[@3](&#x2F;user&#x2F;3).0.5
├── accepts[@1](&#x2F;user&#x2F;1).0.1 (negotiator[@0](&#x2F;user&#x2F;0).4.2)
└── cookies[@0](&#x2F;user&#x2F;0).4.0 (keygrip[@1](&#x2F;user&#x2F;1).0.0)
</code></pre><p>但是毕竟镜像跟官方的 npm 源还是会有一个同步时间差异, 目前 cnpm 的默认同步时间间隔是 15 分钟.
如果你是模块发布者, 或者你想马上同步一个模块, 那么推荐你安装 <a href="https://cnpmjs.org">cnpm</a> cli:</p>
<pre class="prettyprint language-bash"><code>$ npm --registry=https:&#x2F;&#x2F;registry.npm.taobao.org install cnpm -g
</code></pre><p>通过 cnpm 命令行, 你可以快速同步任意模块:</p>
<pre class="prettyprint language-bash"><code>$ cnpm sync koa connect mocha
</code></pre><p>呃, 我就是不想安装 cnpm cli 怎么办? 哈哈, 早就想到你会这么懒了, 于是我们还有一个 web 页面:</p>
<p>例如我想马上同步 koa, 直接打开浏览器: <a href="https://npm.taobao.org/sync/koa">https://npm.taobao.org/sync/koa</a></p>
<p>或者你是命令行控, 通过 open 命令打开:</p>
<pre class="prettyprint language-bash"><code>$ open https:&#x2F;&#x2F;npm.taobao.org&#x2F;sync&#x2F;koa
</code></pre><p>如果你安装的模块依赖了 C++ 模块, 需要编译, 肯定会通过 <a href="https://github.com/TooTallNate/node-gyp">node-gyp</a> 来编译,
<a href="https://github.com/TooTallNate/node-gyp">node-gyp</a> 在第一次编译的时候, 需要依赖 <a href="https://nodejs.org">node</a> 源代码, 于是又会去 node dist 下载,
于是大家又会吐槽, 怎么 npm 安装这么慢…</p>
<p>好吧, 于是又要提到 <code>--disturl</code> 参数, 通过七牛的镜像来下载:</p>
<pre class="prettyprint language-bash"><code>$ npm --registry=https:&#x2F;&#x2F;registry.npm.taobao.org --disturl=https:&#x2F;&#x2F;npm.taobao.org&#x2F;mirrors&#x2F;node install microtime
</code></pre><p>再次要提到 cnpm cli, 它已经默认将 <code>--registry</code> 和 <code>--disturl</code> 都配置好了, 谁用谁知道
.
写到这里, 就更快疑惑那些不想安装 cnpm cli 又吐槽 npm 慢的同学是基于什么考虑不在本地安装一个 cnpm 呢?</p>
<h2>github 好慢</h2>
<p>好了, 看到这里大家应该对 node 和 npm 已经没有速度慢的问题了.</p>
<p>github 慢, 或者说是它的资源 host 被堵而已, 大家可以通过简单的 hosts 映射解决:</p>
<pre class="prettyprint"><code>185.31.16.184 github.global.ssl.fastly.net
</code></pre><h2>为何最近访问国外网站这么慢?</h2>
<p>听说是 APCN2 又断了: <a href="http://weibo.com/1415338244/ACTYkq8xK">http://weibo.com/1415338244/ACTYkq8xK</a> (APCN2 以修复很久)</p>
<p><img src="http://ww4.sinaimg.cn/large/545c5904gw1eeu7h63hxvj20qs0mp78p.jpg" alt="1"></p>
<h2>有爱</h2>
<p>希望文本对你有用. :)</p>
</div>
      </div>
    </div>
  </div>
  
  <div class='panel'>
    <div class='header'>
      <span class='col_fade'>51 回复</span>
    </div>
    <div class='cell reply_area reply_item
  '
  id="reply1" reply_id="5338c73c7cbade005b028272" reply_to_id="">
  <a class="anchor" id="5338c73c7cbade005b028272"></a>

  <div class='author_content'>
    <a href="/user/echorenyuan" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/266379?v=3&amp;s=120" title="echorenyuan"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/echorenyuan">echorenyuan
      </a>
      <a class="reply_time" href="#5338c73c7cbade005b028272">1楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-echorenyuan'>
    <div class="markdown-text"><p>支持并期待着</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply2" reply_id="5338c8907cbade005b02bf18" reply_to_id="">
  <a class="anchor" id="5338c8907cbade005b02bf18"></a>

  <div class='author_content'>
    <a href="/user/Pana" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/552081?v=3&amp;s=120" title="Pana"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/Pana">Pana
      </a>
      <a class="reply_time" href="#5338c8907cbade005b02bf18">2楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-Pana'>
    <div class="markdown-text"><p>好早呀, 期待.</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply3" reply_id="5338c91b7cbade005b02e1d3" reply_to_id="">
  <a class="anchor" id="5338c91b7cbade005b02e1d3"></a>

  <div class='author_content'>
    <a href="/user/DoubleSpout" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/971370?v=3&amp;s=120" title="DoubleSpout"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/DoubleSpout">DoubleSpout
      </a>
      <a class="reply_time" href="#5338c91b7cbade005b02e1d3">3楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-DoubleSpout'>
    <div class="markdown-text"><p>属于占坑的美文~</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply4" reply_id="5338c99f7cbade005b0306ac" reply_to_id="">
  <a class="anchor" id="5338c99f7cbade005b0306ac"></a>

  <div class='author_content'>
    <a href="/user/xieren58" class="user_avatar">
      <img src="//gravatar.com/avatar/85394c77cd5d915f13c7b47ecb4c2c06?size=48" title="xieren58"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/xieren58">xieren58
      </a>
      <a class="reply_time" href="#5338c99f7cbade005b0306ac">4楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-xieren58'>
    <div class="markdown-text"><p>占坑, 广告联系我~ 嘿嘿</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply5" reply_id="5338d3dd6eeafda85b0014d0" reply_to_id="">
  <a class="anchor" id="5338d3dd6eeafda85b0014d0"></a>

  <div class='author_content'>
    <a href="/user/fengmk2" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/156269?v=3&amp;s=120" title="fengmk2"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/fengmk2">fengmk2
      </a>
      <a class="reply_time" href="#5338d3dd6eeafda85b0014d0">5楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-fengmk2'>
    <div class="markdown-text"><p>搞掂了, 干活去</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply6" reply_id="5338d5696eeafda85b00794b" reply_to_id="">
  <a class="anchor" id="5338d5696eeafda85b00794b"></a>

  <div class='author_content'>
    <a href="/user/dead-horse" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/985607?v=3&amp;s=120" title="dead-horse"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/dead-horse">dead-horse
      </a>
      <a class="reply_time" href="#5338d5696eeafda85b00794b">6楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-dead-horse'>
    <div class="markdown-text"><p>cnpm 还支持 gzip …</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply7" reply_id="5338d77488ed3fc55b000a56" reply_to_id="5338d5696eeafda85b00794b">
  <a class="anchor" id="5338d77488ed3fc55b000a56"></a>

  <div class='author_content'>
    <a href="/user/fengmk2" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/156269?v=3&amp;s=120" title="fengmk2"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/fengmk2">fengmk2
      </a>
      <a class="reply_time" href="#5338d77488ed3fc55b000a56">7楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-fengmk2'>
    <div class="markdown-text"><p>哈哈, 都忘记写这个最重要的特性了</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply8" reply_id="533902c9e490381e5d002a0b" reply_to_id="">
  <a class="anchor" id="533902c9e490381e5d002a0b"></a>

  <div class='author_content'>
    <a href="/user/jbasttdi" class="user_avatar">
      <img src="//gravatar.com/avatar/1c837175f3dfafc6233bec96326b2fa8?size=48" title="jbasttdi"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/jbasttdi">jbasttdi
      </a>
      <a class="reply_time" href="#533902c9e490381e5d002a0b">8楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-jbasttdi'>
    <div class="markdown-text"><p>npm安装用代理也不错。</p>
<p>npm config set proxy=http://127.0.0.1:8087
npm config set registry=http://registry.npmjs.org</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply9" reply_id="53390c6fe490381e5d029401" reply_to_id="">
  <a class="anchor" id="53390c6fe490381e5d029401"></a>

  <div class='author_content'>
    <a href="/user/shanelau" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/3140898?v=3&amp;s=120" title="shanelau"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/shanelau">shanelau
      </a>
      <a class="reply_time" href="#53390c6fe490381e5d029401">9楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-shanelau'>
    <div class="markdown-text"><p>难怪github最近慢的死</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply10" reply_id="5339447efc8bfebb5e01a03a" reply_to_id="">
  <a class="anchor" id="5339447efc8bfebb5e01a03a"></a>

  <div class='author_content'>
    <a href="/user/superRaytin" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/2723376?v=3&amp;s=120" title="superRaytin"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/superRaytin">superRaytin
      </a>
      <a class="reply_time" href="#5339447efc8bfebb5e01a03a">10楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-superRaytin'>
    <div class="markdown-text"><p>赞!</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply11" reply_id="5339716c59f1d8ff60005eab" reply_to_id="">
  <a class="anchor" id="5339716c59f1d8ff60005eab"></a>

  <div class='author_content'>
    <a href="/user/dlutwuwei" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/3362483?v=3&amp;s=120" title="dlutwuwei"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/dlutwuwei">dlutwuwei
      </a>
      <a class="reply_time" href="#5339716c59f1d8ff60005eab">11楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-dlutwuwei'>
    <div class="markdown-text"><p>感谢</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply12" reply_id="533a440bf3c9ba5465010638" reply_to_id="">
  <a class="anchor" id="533a440bf3c9ba5465010638"></a>

  <div class='author_content'>
    <a href="/user/coolicer" class="user_avatar">
      <img src="//gravatar.com/avatar/06c787094a6d37ab8281d90b40a33a0e?size=48" title="coolicer"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/coolicer">coolicer
      </a>
      <a class="reply_time" href="#533a440bf3c9ba5465010638">12楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-coolicer'>
    <div class="markdown-text"><p>支持，感谢。</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply13" reply_id="533ce09e6509888f0401e7c4" reply_to_id="">
  <a class="anchor" id="533ce09e6509888f0401e7c4"></a>

  <div class='author_content'>
    <a href="/user/zhpengi" class="user_avatar">
      <img src="//gravatar.com/avatar/a2c553c77b15d91358d347ea17844f80?size=48" title="zhpengi"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/zhpengi">zhpengi
      </a>
      <a class="reply_time" href="#533ce09e6509888f0401e7c4">13楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-zhpengi'>
    <div class="markdown-text"><p><a href="/user/suqian">@suqian</a>
$ cnpm install koa
npm WARN install Refusing to install koa as a dependency of itself
求解决</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply14" reply_id="533ce0e06509888f0401f689" reply_to_id="533ce09e6509888f0401e7c4">
  <a class="anchor" id="533ce0e06509888f0401f689"></a>

  <div class='author_content'>
    <a href="/user/fengmk2" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/156269?v=3&amp;s=120" title="fengmk2"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/fengmk2">fengmk2
      </a>
      <a class="reply_time" href="#533ce0e06509888f0401f689">14楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-fengmk2'>
    <div class="markdown-text"><p>厄, 我安装没问题啊</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply15" reply_id="533d082ad8838d2105018aac" reply_to_id="533ce09e6509888f0401e7c4">
  <a class="anchor" id="533d082ad8838d2105018aac"></a>

  <div class='author_content'>
    <a href="/user/dead-horse" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/985607?v=3&amp;s=120" title="dead-horse"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/dead-horse">dead-horse
      </a>
      <a class="reply_time" href="#533d082ad8838d2105018aac">15楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-dead-horse'>
    <div class="markdown-text"><p>你在 koa 的项目文件夹下装 koa 是会报错的。。。它不是提示你了么</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply16" reply_id="533d64448abcb0f807009bd2" reply_to_id="533ce09e6509888f0401e7c4">
  <a class="anchor" id="533d64448abcb0f807009bd2"></a>

  <div class='author_content'>
    <a href="/user/zhpengi" class="user_avatar">
      <img src="//gravatar.com/avatar/a2c553c77b15d91358d347ea17844f80?size=48" title="zhpengi"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/zhpengi">zhpengi
      </a>
      <a class="reply_time" href="#533d64448abcb0f807009bd2">16楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-zhpengi'>
    <div class="markdown-text"><p><a href="/user/dead-horse">@dead-horse</a>
原来 我就莫名其妙 这错误报的 已解决 谢谢</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply17" reply_id="533f7e38ffdd8f141d00f89f" reply_to_id="">
  <a class="anchor" id="533f7e38ffdd8f141d00f89f"></a>

  <div class='author_content'>
    <a href="/user/aszxqw" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/2162645?v=3&amp;s=120" title="aszxqw"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/aszxqw">aszxqw
      </a>
      <a class="reply_time" href="#533f7e38ffdd8f141d00f89f">17楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-aszxqw'>
    <div class="markdown-text"><p>好顶赞</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply18" reply_id="534037c8b7aabd8823001678" reply_to_id="">
  <a class="anchor" id="534037c8b7aabd8823001678"></a>

  <div class='author_content'>
    <a href="/user/barretlee" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/2698003?v=3&amp;s=120" title="barretlee"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/barretlee">barretlee
      </a>
      <a class="reply_time" href="#534037c8b7aabd8823001678">18楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-barretlee'>
    <div class="markdown-text"><p><a href="http://hi.barretlee.com/2014/03/31/npm-cross-wall/">http://hi.barretlee.com/2014/03/31/npm-cross-wall/</a>
npm 的问题</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply19" reply_id="53436f5d3b64b3463e028875" reply_to_id="">
  <a class="anchor" id="53436f5d3b64b3463e028875"></a>

  <div class='author_content'>
    <a href="/user/miconlee" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/3059543?&amp;s=120" title="miconlee"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/miconlee">miconlee
      </a>
      <a class="reply_time" href="#53436f5d3b64b3463e028875">19楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-miconlee'>
    <div class="markdown-text">&lt;script&gt;alert("xss")&lt;/script&gt;</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply20" reply_id="53436fb53b64b3463e029b15" reply_to_id="">
  <a class="anchor" id="53436fb53b64b3463e029b15"></a>

  <div class='author_content'>
    <a href="/user/miconlee" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/3059543?&amp;s=120" title="miconlee"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/miconlee">miconlee
      </a>
      <a class="reply_time" href="#53436fb53b64b3463e029b15">20楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-miconlee'>
    <div class="markdown-text">&lt;script&gt;alert("xss")&lt;/script&gt;//"</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply21" reply_id="53436fec3b64b3463e02a579" reply_to_id="">
  <a class="anchor" id="53436fec3b64b3463e02a579"></a>

  <div class='author_content'>
    <a href="/user/miconlee" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/3059543?&amp;s=120" title="miconlee"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/miconlee">miconlee
      </a>
      <a class="reply_time" href="#53436fec3b64b3463e02a579">21楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-miconlee'>
    <div class="markdown-text"><p><a href>用户填写的超链接描述</a></p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply22" reply_id="53463bb6cb6fd9d06c0186f0" reply_to_id="">
  <a class="anchor" id="53463bb6cb6fd9d06c0186f0"></a>

  <div class='author_content'>
    <a href="/user/fengmk2" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/156269?v=3&amp;s=120" title="fengmk2"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/fengmk2">fengmk2
      </a>
      <a class="reply_time" href="#53463bb6cb6fd9d06c0186f0">22楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-fengmk2'>
    <div class="markdown-text"><p>If you’re in China, maybe you should install it from our China mirror taobao npm:</p>
<pre class="prettyprint language-bash"><code>$ npm install -g cnpm --registry=https:&#x2F;&#x2F;registry.npm.taobao.org
</code></pre></div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply23" reply_id="534beb4fe6f2676a121c91c8" reply_to_id="">
  <a class="anchor" id="534beb4fe6f2676a121c91c8"></a>

  <div class='author_content'>
    <a href="/user/iversong" class="user_avatar">
      <img src="//gravatar.com/avatar/5fb0c86adaf6b9232513bd0b3ffd5e8d?size=48" title="iversong"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/iversong">iversong
      </a>
      <a class="reply_time" href="#534beb4fe6f2676a121c91c8">23楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          " title="喜欢"></i>
        <span class="up-count">
          1
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-iversong'>
    <div class="markdown-text"><p>安装了cnpm也无法install，楼主给瞧瞧</p>
<pre class="prettyprint language-python"><code>[root@localhost node-sl]# cnpm install mongoose
npm http GET http:&#x2F;&#x2F;r.cnpmjs.org&#x2F;mongoose
npm http GET http:&#x2F;&#x2F;r.cnpmjs.org&#x2F;mongoose
npm http GET http:&#x2F;&#x2F;r.cnpmjs.org&#x2F;mongoose
npm http GET http:&#x2F;&#x2F;r.cnpmjs.org&#x2F;mongoose&#x2F;download&#x2F;mongoose-3.8.8.tgz
npm ERR! fetch failed http:&#x2F;&#x2F;r.cnpmjs.org&#x2F;mongoose&#x2F;download&#x2F;mongoose-3.8.8.tgz
npm http GET http:&#x2F;&#x2F;r.cnpmjs.org&#x2F;mongoose&#x2F;download&#x2F;mongoose-3.8.8.tgz
npm ERR! fetch failed http:&#x2F;&#x2F;r.cnpmjs.org&#x2F;mongoose&#x2F;download&#x2F;mongoose-3.8.8.tgz
npm http GET http:&#x2F;&#x2F;r.cnpmjs.org&#x2F;mongoose&#x2F;download&#x2F;mongoose-3.8.8.tgz
npm ERR! fetch failed http:&#x2F;&#x2F;r.cnpmjs.org&#x2F;mongoose&#x2F;download&#x2F;mongoose-3.8.8.tgz
npm ERR! network write ECONNRESET
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settin
gs.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network &#x27;proxy&#x27; config is set properly.  See: &#x27;npm help config&#x27;

npm ERR! System Linux 2.6.32-431.11.2.el6.x86_64
npm ERR! command &quot;node&quot; &quot;&#x2F;usr&#x2F;local&#x2F;node&#x2F;lib&#x2F;node_modules&#x2F;cnpm&#x2F;node_modules&#x2F;.bin
&#x2F;npm&quot; &quot;--userconfig=&#x2F;root&#x2F;.cnpmrc&quot; &quot;--disturl=http:&#x2F;&#x2F;dist.cnpmjs.org&quot; &quot;--cache=&#x2F;
root&#x2F;.npm&#x2F;.cache_cnpm&quot; &quot;--registry=http:&#x2F;&#x2F;r.cnpmjs.org&quot; &quot;install&quot; &quot;mongoose&quot;
npm ERR! cwd &#x2F;mnt&#x2F;hgfs&#x2F;linux_root&#x2F;node-sl
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.6
npm ERR! syscall write
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     &#x2F;mnt&#x2F;hgfs&#x2F;linux_root&#x2F;node-sl&#x2F;npm-debug.log
npm ERR! not ok code 0
</code></pre></div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply24" reply_id="534bf381e6f2676a121e35ad" reply_to_id="">
  <a class="anchor" id="534bf381e6f2676a121e35ad"></a>

  <div class='author_content'>
    <a href="/user/fengmk2" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/156269?v=3&amp;s=120" title="fengmk2"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/fengmk2">fengmk2
      </a>
      <a class="reply_time" href="#534bf381e6f2676a121e35ad">24楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-fengmk2'>
    <div class="markdown-text"><p>重试?</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply25" reply_id="53be3ad8a3ccaece73b9c896" reply_to_id="">
  <a class="anchor" id="53be3ad8a3ccaece73b9c896"></a>

  <div class='author_content'>
    <a href="/user/lunix01" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/2650209?v=3&amp;s=120" title="lunix01"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/lunix01">lunix01
      </a>
      <a class="reply_time" href="#53be3ad8a3ccaece73b9c896">25楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-lunix01'>
    <div class="markdown-text"><p>一直 --registry=http://r.cnpmjs.org
npm config set registry=http://registry.npmjs.org</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply26" reply_id="53d676dcda454a107123f8cd" reply_to_id="">
  <a class="anchor" id="53d676dcda454a107123f8cd"></a>

  <div class='author_content'>
    <a href="/user/bnpysse" class="user_avatar">
      <img src="//gravatar.com/avatar/582045bfe6700d1ef2daad091a756b3b?size=48" title="bnpysse"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/bnpysse">bnpysse
      </a>
      <a class="reply_time" href="#53d676dcda454a107123f8cd">26楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-bnpysse'>
    <div class="markdown-text"><p>每次重开一个终端，总是回到原来安装过的版本呢</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply27" reply_id="53d6fdc558cac416713f2913" reply_to_id="">
  <a class="anchor" id="53d6fdc558cac416713f2913"></a>

  <div class='author_content'>
    <a href="/user/Lee2011" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/1279697?v=3&amp;s=120" title="Lee2011"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/Lee2011">Lee2011
      </a>
      <a class="reply_time" href="#53d6fdc558cac416713f2913">27楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          " title="喜欢"></i>
        <span class="up-count">
          1
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-Lee2011'>
    <div class="markdown-text"><p>mark</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply28" reply_id="53d6fe8358cac416713f551a" reply_to_id="">
  <a class="anchor" id="53d6fe8358cac416713f551a"></a>

  <div class='author_content'>
    <a href="/user/yunheli" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/5189554?v=3&amp;s=120" title="yunheli"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/yunheli">yunheli
      </a>
      <a class="reply_time" href="#53d6fe8358cac416713f551a">28楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          " title="喜欢"></i>
        <span class="up-count">
          1
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-yunheli'>
    <div class="markdown-text"><p>谢了(<a href="http://fir.im">fir.im</a>)</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply29" reply_id="540678a00256839f718326bf" reply_to_id="">
  <a class="anchor" id="540678a00256839f718326bf"></a>

  <div class='author_content'>
    <a href="/user/Jaha1986" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/8325678?v=2&amp;s=120" title="Jaha1986"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/Jaha1986">Jaha1986
      </a>
      <a class="reply_time" href="#540678a00256839f718326bf">29楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-Jaha1986'>
    <div class="markdown-text"><p>mark</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply30" reply_id="54067c49e84941a57185969f" reply_to_id="">
  <a class="anchor" id="54067c49e84941a57185969f"></a>

  <div class='author_content'>
    <a href="/user/JerroldLee" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/5645510?v=3&amp;s=120" title="JerroldLee"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/JerroldLee">JerroldLee
      </a>
      <a class="reply_time" href="#54067c49e84941a57185969f">30楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-JerroldLee'>
    <div class="markdown-text"><p>mark</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply31" reply_id="5461830e789ab1f8158e1c73" reply_to_id="">
  <a class="anchor" id="5461830e789ab1f8158e1c73"></a>

  <div class='author_content'>
    <a href="/user/fengmk2" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/156269?v=3&amp;s=120" title="fengmk2"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/fengmk2">fengmk2
      </a>
      <a class="reply_time" href="#5461830e789ab1f8158e1c73">31楼•2 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-fengmk2'>
    <div class="markdown-text"><p>别用 n 了，用 nvm 吧</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply32" reply_id="54c06ac908db81d71f316272" reply_to_id="">
  <a class="anchor" id="54c06ac908db81d71f316272"></a>

  <div class='author_content'>
    <a href="/user/Gtskk" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/2942038?v=3&amp;s=120" title="Gtskk"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/Gtskk">Gtskk
      </a>
      <a class="reply_time" href="#54c06ac908db81d71f316272">32楼•1 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-Gtskk'>
    <div class="markdown-text"><p>NVM_NODEJS_ORG_MIRROR=http://npm.taobao.org/mirrors/node nvm install node/latest</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply33" reply_id="5577a4d4c4e7fbea6e9a33ab" reply_to_id="5461830e789ab1f8158e1c73">
  <a class="anchor" id="5577a4d4c4e7fbea6e9a33ab"></a>

  <div class='author_content'>
    <a href="/user/limerickgds" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/9961514?v=3&amp;s=120" title="limerickgds"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/limerickgds">limerickgds
      </a>
      <a class="reply_time" href="#5577a4d4c4e7fbea6e9a33ab">33楼•1 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-limerickgds'>
    <div class="markdown-text"><p><a href="/user/fengmk2">@fengmk2</a> 我安装的时候到npm那一个步骤就出错了，是不是还要配置npm路径的环境变量，我看到装node的时候还是https，等到npm的时候又变成http了。这个怎么破？ <img src="//dn-cnode.qbox.me/Fu2Chb5YYm5p9ABMAkO-I5WdCcYu" alt="nvmw-npm.PNG"></p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply34" reply_id="5577a80ec4e7fbea6e9a33b2" reply_to_id="5461830e789ab1f8158e1c73">
  <a class="anchor" id="5577a80ec4e7fbea6e9a33b2"></a>

  <div class='author_content'>
    <a href="/user/limerickgds" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/9961514?v=3&amp;s=120" title="limerickgds"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/limerickgds">limerickgds
      </a>
      <a class="reply_time" href="#5577a80ec4e7fbea6e9a33b2">34楼•1 年前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-limerickgds'>
    <div class="markdown-text"><p><a href="/user/fengmk2">@fengmk2</a> 改了get_npm.js里边的路径为 https还是不行（ps:这个富文本编译器 输入 _ n 就变成斜体字了）算不算个小bug。</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply35" reply_id="5592650550946a07245256b5" reply_to_id="">
  <a class="anchor" id="5592650550946a07245256b5"></a>

  <div class='author_content'>
    <a href="/user/zhishaofei3" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/2910585?v=2&amp;s=120" title="zhishaofei3"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/zhishaofei3">zhishaofei3
      </a>
      <a class="reply_time" href="#5592650550946a07245256b5">35楼•10 个月前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-zhishaofei3'>
    <div class="markdown-text"><p>C:\Users\Administrator&gt;nvmw</p>
<p>Node Version Manager for Windows</p>
<p>Usage:
nvmw help                          Show this message
nvmw install [version] [arch]      Download and install a [version]
for [arch] architecture (optional)
nvmw uninstall [version]           Uninstall a [version]
nvmw use [version]                 Modify PATH to use [version]
nvmw ls                            List installed versions</p>
<p>Example:
nvmw install v0.10.21        Install a specific version number of node.js
nvmw use v0.10.21            Use the specific version
nvmw install iojs            Install the latest version of io.js
nvmw install iojs-v1.0.2     Install a specific version number of io.js
nvmw use iojs-v1.0.2         Use the specific version io.js</p>
<p>nvmw install v0.10.35 x86    Install a 32-bit version</p>
<p>C:\Users\Administrator&gt;nvmw install 0.10.35
Start installing node/v0.10.35 (x64) to D:\git\nvmw\v0.10.35
输入错误: 没有文件扩展“.js”的脚本引擎。
Download D:\git\nvmw\v0.10.35\node.exe from <a href="https://npm.taobao.org/dist/v0.10.35">https://npm.taobao.org/dist/v0.10.35</a>
/x64/node.exe failed</p>
<p>C:\Users\Administrator&gt;nvmw install 0.10.35
Start installing node/v0.10.35 (x64) to D:\git\nvmw\v0.10.35
输入错误: 没有文件扩展“.js”的脚本引擎。
Download D:\git\nvmw\v0.10.35\node.exe from <a href="https://npm.taobao.org/dist/v0.10.35">https://npm.taobao.org/dist/v0.10.35</a>
/x64/node.exe failed</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply36" reply_id="55acf08fb4ab1d7d02bf0dbf" reply_to_id="">
  <a class="anchor" id="55acf08fb4ab1d7d02bf0dbf"></a>

  <div class='author_content'>
    <a href="/user/cbsheng" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/1468653?v=3&amp;s=120" title="cbsheng"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/cbsheng">cbsheng
      </a>
      <a class="reply_time" href="#55acf08fb4ab1d7d02bf0dbf">36楼•10 个月前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-cbsheng'>
    <div class="markdown-text"><p>mac 10.10.4
nvm ls-remote 返回的是 N/A，node 和 iojs 皆是。
已在.zshrc 中加了export NVM_NODEJS_ORG_MIRROR=&quot;<a href="https://nodejs.org/dist">https://nodejs.org/dist</a>&quot;
有遇到过的吗？</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply37" reply_id="55acf42cb4ab1d7d02bf0dc4" reply_to_id="55acf08fb4ab1d7d02bf0dbf">
  <a class="anchor" id="55acf42cb4ab1d7d02bf0dc4"></a>

  <div class='author_content'>
    <a href="/user/alsotang" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/1147375?v=3&amp;s=120" title="alsotang"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/alsotang">alsotang
      </a>
      <a class="reply_time" href="#55acf42cb4ab1d7d02bf0dc4">37楼•10 个月前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-alsotang'>
    <div class="markdown-text"><p><a href="/user/cbsheng">@cbsheng</a> 看看 nvm 的版本，如果比较老，更新一下。另外，nvm 的返回时间是多久？如果比较久，可能网络堵塞导致的 N/A。
默认情况下，.zshrc 是不用做任何配置的。即使配置，配置成官方的源也没意思。</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply38" reply_id="55acf809b4ab1d7d02bf0dd0" reply_to_id="55acf42cb4ab1d7d02bf0dc4">
  <a class="anchor" id="55acf809b4ab1d7d02bf0dd0"></a>

  <div class='author_content'>
    <a href="/user/cbsheng" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/1468653?v=3&amp;s=120" title="cbsheng"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/cbsheng">cbsheng
      </a>
      <a class="reply_time" href="#55acf809b4ab1d7d02bf0dd0">38楼•10 个月前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-cbsheng'>
    <div class="markdown-text"><p><a href="/user/alsotang">@alsotang</a> 版本是0.23.0， 直接 clone 下来的。
没有返回时间耶，凭感觉大概是3-4秒。</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply39" reply_id="55ec385e9020552d08692f3c" reply_to_id="">
  <a class="anchor" id="55ec385e9020552d08692f3c"></a>

  <div class='author_content'>
    <a href="/user/limerickgds" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/9961514?v=3&amp;s=120" title="limerickgds"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/limerickgds">limerickgds
      </a>
      <a class="reply_time" href="#55ec385e9020552d08692f3c">39楼•8 个月前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-limerickgds'>
    <div class="markdown-text"><p>怎么设置启动的默认node的</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply40" reply_id="55ec3a589020552d08692f3e" reply_to_id="">
  <a class="anchor" id="55ec3a589020552d08692f3e"></a>

  <div class='author_content'>
    <a href="/user/SPxiaomin" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/10915375?v=3&amp;s=120" title="SPxiaomin"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/SPxiaomin">SPxiaomin
      </a>
      <a class="reply_time" href="#55ec3a589020552d08692f3e">40楼•8 个月前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-SPxiaomin'>
    <div class="markdown-text"><p>mark,
学校网速慢到我想哭了。。。</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply41" reply_id="560b984d152fdd025f0f5137" reply_to_id="">
  <a class="anchor" id="560b984d152fdd025f0f5137"></a>

  <div class='author_content'>
    <a href="/user/ibigbug" class="user_avatar">
      <img src="//gravatar.com/avatar/3b6236efa4fd7dfd2b6c4a7c20bb8c83?size=48" title="ibigbug"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/ibigbug">ibigbug
      </a>
      <a class="reply_time" href="#560b984d152fdd025f0f5137">41楼•7 个月前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-ibigbug'>
    <div class="markdown-text"><p>有用</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply42" reply_id="560d0836f34f7ba804c4e1d5" reply_to_id="">
  <a class="anchor" id="560d0836f34f7ba804c4e1d5"></a>

  <div class='author_content'>
    <a href="/user/ar-insect" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/5178517?v=3&amp;s=120" title="ar-insect"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/ar-insect">ar-insect
      </a>
      <a class="reply_time" href="#560d0836f34f7ba804c4e1d5">42楼•7 个月前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-ar-insect'>
    <div class="markdown-text"><p>写得很好，简单明了。</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply43" reply_id="561c576c5a4ffebe39e2fafc" reply_to_id="">
  <a class="anchor" id="561c576c5a4ffebe39e2fafc"></a>

  <div class='author_content'>
    <a href="/user/Guicai-Li" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/8835000?v=3&amp;s=120" title="Guicai-Li"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/Guicai-Li">Guicai-Li
      </a>
      <a class="reply_time" href="#561c576c5a4ffebe39e2fafc">43楼•7 个月前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-Guicai-Li'>
    <div class="markdown-text"><p>mark</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply44" reply_id="56323d3c8325d4f62a49aae2" reply_to_id="">
  <a class="anchor" id="56323d3c8325d4f62a49aae2"></a>

  <div class='author_content'>
    <a href="/user/quickbird" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/2713722?v=3&amp;s=120" title="quickbird"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/quickbird">quickbird
      </a>
      <a class="reply_time" href="#56323d3c8325d4f62a49aae2">44楼•7 个月前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-quickbird'>
    <div class="markdown-text"><p>好文呀， 果断收藏了</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply45" reply_id="56330d06268d85fd291adf15" reply_to_id="">
  <a class="anchor" id="56330d06268d85fd291adf15"></a>

  <div class='author_content'>
    <a href="/user/deajosha" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/4038429?v=3&amp;s=120" title="deajosha"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/deajosha">deajosha
      </a>
      <a class="reply_time" href="#56330d06268d85fd291adf15">45楼•6 个月前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-deajosha'>
    <div class="markdown-text"><p>nice</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply46" reply_id="5634336666c8f3c649a58461" reply_to_id="">
  <a class="anchor" id="5634336666c8f3c649a58461"></a>

  <div class='author_content'>
    <a href="/user/Samurais" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/3538629?v=3&amp;s=120" title="Samurais"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/Samurais">Samurais
      </a>
      <a class="reply_time" href="#5634336666c8f3c649a58461">46楼•6 个月前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-Samurais'>
    <div class="markdown-text"><p>mark</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply47" reply_id="564c2e9d6fc3f5ae7e0b7ed3" reply_to_id="">
  <a class="anchor" id="564c2e9d6fc3f5ae7e0b7ed3"></a>

  <div class='author_content'>
    <a href="/user/Carrotzpc" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/10265417?v=3&amp;s=120" title="Carrotzpc"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/Carrotzpc">Carrotzpc
      </a>
      <a class="reply_time" href="#564c2e9d6fc3f5ae7e0b7ed3">47楼•6 个月前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-Carrotzpc'>
    <div class="markdown-text"><p><strong>Windows</strong> 推荐使用  <a href="https://github.com/coreybutler/nvm-windows">nvm-windows</a> ，  <a href="https://github.com/hakobera/nvmw">nvmw</a> 经测试不支持4.0以后的版本</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply48" reply_id="567b9726a056d34607805773" reply_to_id="">
  <a class="anchor" id="567b9726a056d34607805773"></a>

  <div class='author_content'>
    <a href="/user/j60017268" class="user_avatar">
      <img src="//gravatar.com/avatar/e3452f82d9b172c32e29559d5472d3d0?size=48" title="j60017268"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/j60017268">j60017268
      </a>
      <a class="reply_time" href="#567b9726a056d34607805773">48楼•5 个月前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-j60017268'>
    <div class="markdown-text"><p>为啥不用n，npm安装，操作又简单。</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply49" reply_id="56e151149386fbf86ddd69b5" reply_to_id="">
  <a class="anchor" id="56e151149386fbf86ddd69b5"></a>

  <div class='author_content'>
    <a href="/user/federerlee" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/12049508?v=3&amp;s=120" title="federerlee"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/federerlee">federerlee
      </a>
      <a class="reply_time" href="#56e151149386fbf86ddd69b5">49楼•2 个月前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-federerlee'>
    <div class="markdown-text"><p>之前在国外npm install用得好顺畅，现在回到国内npm install用不了，用taobao.org的镜像也安装不了packages。
查/npm-debug.log也查不出问题来。ping <a href="http://registry.npm.taobao.org">registry.npm.taobao.org</a> 会有package loss，大家是否会出现此情况呢？</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply50" reply_id="571398a70a1e9da252f1e407" reply_to_id="">
  <a class="anchor" id="571398a70a1e9da252f1e407"></a>

  <div class='author_content'>
    <a href="/user/smallaitt" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/4328836?v=3&amp;s=120" title="smallaitt"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/smallaitt">smallaitt
      </a>
      <a class="reply_time" href="#571398a70a1e9da252f1e407">50楼•1 个月前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-smallaitt'>
    <div class="markdown-text"><p><a href="/user/fengmk2">@fengmk2</a> 使用nvmw的时候报错了。
C:\Users\Administrator&gt;nvmw install v4.4.3
Start installing node/v4.4.3 (x64) to e:\libs\nvmw\v4.4.3
Download from <a href="https://npm.taobao.org/mirrors/node/v4.4.3/x64/node.exe">https://npm.taobao.org/mirrors/node/v4.4.3/x64/node.exe</a>, and save
it as e:\libs\nvmw\v4.4.3\node.exe
404 Not Found
Download e:\libs\nvmw\v4.4.3\node.exe from <a href="https://npm.taobao.org/mirrors/node/v">https://npm.taobao.org/mirrors/node/v</a>
4.4.3/x64/node.exe failed</p>
<p>C:\Users\Administrator&gt;</p>
<p>然后我到https://npm.taobao.org/mirrors/node/v4.4.3/去看了下，目录名字应该是win-x64而不是x64。
应该是个bug。</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>
<div class='cell reply_area reply_item
  '
  id="reply51" reply_id="57147e10238ae0ac1e3a6ac1" reply_to_id="571398a70a1e9da252f1e407">
  <a class="anchor" id="57147e10238ae0ac1e3a6ac1"></a>

  <div class='author_content'>
    <a href="/user/sjfkai" class="user_avatar">
      <img src="https://avatars.githubusercontent.com/u/7581901?v=3&amp;s=120" title="sjfkai"/></a>

    <div class='user_info'>
      <a class='dark reply_author' href="/user/sjfkai">sjfkai
      </a>
      <a class="reply_time" href="#57147e10238ae0ac1e3a6ac1">51楼•1 个月前</a>
    </div>
    <div class='user_action'>
      <span>
        <i class="fa up_btn
          fa-thumbs-o-up
          invisible" title="喜欢"></i>
        <span class="up-count">
          
        </span>
      </span>
      
      <span>
        
      </span>
    </div>
  </div>
  <div class='reply_content from-sjfkai'>
    <div class="markdown-text"><p><a href="/user/smallaitt">@smallaitt</a> 应该是<a href="https://github.com/hakobera/nvmw">nvmw</a>的问题 很多<a href="https://github.com/hakobera/nvmw/pull/76">PR</a> 要修复这个问题但是没有被作者merge 而且作者修改了README说他再维护nvmw了。。</p>
</div>
  </div>
  <div class='clearfix'>
    <div class='reply2_area'>
      
    </div>
  </div>
</div>

  </div>
  
  
</div>

<div class="replies_history">
  <div class="inner_content"></div>
  <div class="anchor"></div>
</div>

<!-- 预览模态对话框 -->
<div class="modal fade" id="preview-modal">
  <div class="modal-body" style="max-height: initial;">
    <img src="" alt="点击内容或者外部自动关闭图片预览" id="preview-image">
  </div>
</div>




<script type="text/javascript">
  (function(){
    var timer = null; //对话框延时定时器
    // 初始化 $('.replies_history')
    var $repliesHistory = $('.replies_history');
    var $repliesHistoryContent = $repliesHistory.find('.inner_content');
    $repliesHistory.hide();
    // END
    // 鼠标移入对话框清除隐藏定时器；移出时隐藏对话框
    $repliesHistory.on('mouseenter', function(){
      clearTimeout(timer);
    }).on('mouseleave', function(){
      $repliesHistory.fadeOut('fast');
    });
    // 显示被 at 用户的本页评论
    if ($('.reply2_item').length === 0) {
      // 只在流式评论布局中使用

      $('#content').on('mouseenter', '.reply_content a', function (e) {
        clearTimeout(timer);
        var $this = $(this);
        if ($this.text()[0] === '@') {
          var thisText = $this.text().trim();
          var loginname = thisText.slice(1);
          var offset = $this.offset();
          var width = $this.width();
          var mainOffset = $('#main').offset();
          $repliesHistory.css('left', offset.left-mainOffset.left+width+10); // magic number
          $repliesHistory.css('top', offset.top-mainOffset.top-10); // magic number
          $repliesHistory.css({
            'z-index': 1,
          });
          $repliesHistoryContent.empty();
          var chats = [];
          var replyToId = $this.closest('.reply_item').attr('reply_to_id');
          while (replyToId) {
            var $replyItem = $('.reply_item[reply_id=' + replyToId + ']');
            var replyContent = $replyItem.find('.reply_content').text().trim();
            if (replyContent.length > 0) {
              chats.push([
                $($replyItem.find('.user_avatar').html()).attr({
                  height: '30px',
                  width: '30px',
                }), // avatar
                (replyContent.length>300?replyContent.substr(0,300)+'...':replyContent), // reply content
                '<a href="#'+replyToId+'" class="scroll_to_original" title="查看原文">↑</a>'
              ]);
            }
            replyToId = $replyItem.attr('reply_to_id');
          }
          if(chats.length > 0) {
            chats.reverse();

            $repliesHistoryContent.append('<div class="title">查看对话</div>');
            chats.forEach(function (pair, idx) {
              var $chat = $repliesHistoryContent.append('<div class="item"></div>');
              $chat.append(pair[0]); // 头像
              $chat.append($('<span>').text(pair[1])); // 内容
              $chat.append(pair[2]); // 查看原文 anchor
            });
            $repliesHistory.fadeIn('fast');
          }else{
            $repliesHistory.hide();
          }
        }
      }).on('mouseleave', '.reply_content a', function (e) {
        timer = setTimeout(function(){
          $repliesHistory.fadeOut('fast');
        }, 500);
      });
    }
    // END 显示被 at 用户的本页评论
  })();

  // 点赞
  $('.up_btn').click(function (e) {
    var $this = $(this);
    var replyId = $this.closest('.reply_area').attr('reply_id');
    $.ajax({
      url: '/reply/' + replyId + '/up',
      method: 'POST',
    }).done(function (data) {
      if (data.success) {
        $this.removeClass('invisible');
        var currentCount = Number($this.next('.up-count').text().trim()) || 0;
        if (data.action === 'up') {
          $this.next('.up-count').text(currentCount + 1);
          $this.addClass('uped');
        } else {
          if (data.action === 'down') {
            $this.next('.up-count').text(currentCount - 1);
            $this.removeClass('uped');
          }
        }
      } else {
        alert(data.message);
      }
    }).fail(function (xhr) {
      if (xhr.status === 403) {
        alert('请先登录，登陆后即可点赞。');
      }
    });
  });
  // END 点赞
  // 图片预览
  (function(){
    var $previewModal = $('#preview-modal');
    var $previewImage = $('#preview-image');
    var $body = $('body'); // cache

    $(document).on('click', '.markdown-text img', function(e) {
      var $img = $(this);
      // 图片被a标签包裹时，不显示弹层
      if ($img.parent('a').length > 0) {
        return;
      }
      showModal($img.attr('src'));
    });

    $previewModal.on('click', hideModal);

    $previewModal.on('hidden.bs.modal', function() {
      // 在预览框消失之后恢复 body 的滚动能力
      $body.css('overflow-y', 'scroll');
    })

    $previewModal.on('shown.bs.modal', function() {
      // 修复上次滚动留下的痕迹,可能会导致短暂的闪烁，不过可以接受
      // TODO: to be promote
      $previewModal.scrollTop(0);
    })

    function showModal(src) {
      $previewImage.attr('src', src);
      $previewModal.modal('show');
      // 禁止 body 滚动
      $body.css('overflow-y', 'hidden');
    }

    function hideModal() {
      $previewModal.modal('hide');
    }

  })()
  // END 图片预览
</script>

</div>
<div id='backtotop'>回到顶部</div>
<div id='footer'>
  <div id='footer_main'>
    <div class="links">
      <a class='dark' href='/rss'>RSS</a>
      |
      <a class='dark' href='https://github.com/cnodejs/nodeclub/'>源码地址</a>
    </div>

    <div class='col_fade'>

  <p>CNode 社区为国内最专业的 Node.js 开源技术社区，致力于 Node.js 的技术研究。</p>
  <p>服务器赞助商为
    <a href="http://www.ucloud.cn/?utm_source=zanzhu&utm_campaign=cnodejs&utm_medium=display&utm_content=yejiao&ytag=cnodejs_logo" target="_blank"
      class="sponsor_outlink" data-label="ucloud_bottom">
      <img src="//dn-cnode.qbox.me/FuIpEaM9bvsZKnQ3QfPtBHWQmLM9" title="ucloud"
      alt="ucloud" width="92px"/>
    </a>
  ，存储赞助商为
    <a href="http://www.qiniu.com/?ref=cnode" target="_blank"
      class="sponsor_outlink" data-label="qiniu_bottom">
      <img src="//o4j806krb.qnssl.com/public/images/qiniu.png" title="七牛云存储"
      alt="七牛云存储" width="115px"/>
    </a>
  ，由<a href="http://alinode.aliyun.com/?ref=cnode" target="_blank"
      class="sponsor_outlink" data-label="alinode_bottom">
      <img src="//dn-cnode.qbox.me/FpMZk31PDyxkC8yStmMQL4XroaGD" title="alinode"
      alt="alinode" height="54px" width="166px"/>
    </a>提供应用性能服务。
  </p>
  <p>新手搭建 Node.js 服务器，推荐使用无需备案的 <a href="https://www.digitalocean.com/?refcode=eba02656eeb3">DigitalOcean(https://www.digitalocean.com/)</a></p>
</div>


  </div>
</div>
<div id="sidebar-mask"></div>


<script>
  // google analytics
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script', "https://www.google-analytics.com/analytics.js",'ga');

  ga('create', 'UA-41753901-5', 'auto');
  ga('send', 'pageview');
</script>



<div style="display:none;">
  <script src="//s95.cnzz.com/z_stat.php?id=1254020586&web_id=1254020586" language="JavaScript"></script>
</div>


</body>
</html>
